var should = require('should');
var huntHandler = require('../../../app/servers/user/handler/huntHandler.js');
var roleModel = require('../../../app/models/roleModel');
var config = require('../../config');
var configUtil = require('../../../app/util/configUtil');
var analyze = require('kc-analyze');

suite('测试huntHandler', function () {
    setup(function (done) {
        var analyze_config = configUtil.load('analyze');
        var game_config = configUtil.load('game');
        analyze.initialize({
            host: analyze_config.host,
            server_id: game_config.server_id
        });
        done();
    });

    test('领取主城小玩法 ----  打猎奖励', function (done) {
        var msg = {};
        msg.hunt_id = 1;

        var session = {};
        session.uid = config.role_id;

        var hunt_handler = new huntHandler();
        hunt_handler.receiveHunt(msg, session, function (err, res) {
            // console.log('res: ', res);
            // console.log('err:', err);
            done();
        });
    });

    test('领取主城小玩法 ----  内城宝箱奖励', function (done) {
        var msg = {};
        var session = {};
        session.uid = config.role_id;

        var hunt_handler = new huntHandler();
        hunt_handler.receiveChest(msg, session, function (err, res) {
            // console.log('res:', res);
            done();
        });
    });
});
